package JLB_Chapter_02;

public class code_02_04 {
    public static void main(String[] args) {
        /**
         * DoubleUnAccurate2
         */
        //声明float类型变量是必须添加“f”后缀
        float f1 = 13.23f;
        double x = 0.1;
        double y = 2.0 - 1.9;
        System.out.println("f1 = " + f1);
        System.out.println("x = " + x);
        System.out.println("y = " + y);
        System.out.println("x == y的结果：" + (x == y));
        boolean bool = Math.abs(x - y) < (1e-6);
        System.out.println("两数之差绝对值小于最小数的结果：" + bool);
    }
}
